Blog

Loading ColdBox Settings from the database

Luis Majano January 16, 2009

Spread the word

Luis Majano

January 16, 2009

Spread the word


Share your thoughts

The ColdBox configuration file has a place for you as the developer to create as many custom setting variables as you like.  You can create simple or complex settings via JSON notation.  This approach is great, but sometimes, you want for these variables to be, well, more dynamic.  The following UDF helps you achieve this, by storing your name-value pairs of settings in a persisten storage such as a database.  Then just basically call this UDF from your application start handler and voila!! You are ready to roll with settings that can be managed from a control panel of your application or any other dynamic approach.  You can even get creative and create your own reloading techniques for only application settings. There you go!!

Add Your Comment

(1)

Jan 16, 2013 01:36:35 UTC

by Daniel M

Luis, are you going to post the UDF again?

Recent Entries

Building Native CLI Apps with MatchBox & Native Fusion

Building Native CLI Apps with MatchBox & Native Fusion

MatchBox makes BoxLang practical for a classic deployment target: the single-file command-line application.

The MatchBox open beta is available at https://github.com/ortus-boxlang/matchbox.

With the MatchBox native target, you can compile a .bxs script into a standalone executable for macOS, Linux, or Windows. The generated binary includes the MatchBox VM core and your compiled BoxLang bytecode. It does not require a JVM, a separate MatchBox install, or any runtime on the target machine.

Jacob Beers
Jacob Beers
July 14, 2026